<%= form_for @user do |f| %>
<div class="form-group">
  <%= f.label :name, '用户名', class: 'placeholder-label', style: 'z-index: 100' %>
  <%= f.text_field :name, class: 'form-control', placehoder: '用户名' %>
</div>
<div class="form-group">
  <%= f.label :email, '邮箱', class: 'placeholder-label', style: 'z-index: 100' %>
  <%= f.text_field :email, class: 'form-control', placehoder: '邮箱' %>
</div>
<div class="form-group">
  <%= f.label :group_id, '部门', class: 'placeholder-label', style: 'z-index: 100' %>
  <%= f.collection_select :group_id, Group.all, :id, :name, {include_blank: true}, {class: 'form-control'} %>
</div>
<div class="form-group">
  <%= f.submit '更新', class: 'btn btn-primary btn-flat btn-block', data: {disable_with: '更新中...'} %>
</div>
<% end %>
<script>
$(document).ready(function(){
  $('input[placeholder], textarea[placeholder]').placeholderLabel();
});
</script>